cmake_minimum_required(VERSION 3.0.2)
project(show_sensor)

add_compile_options(-std=c++11)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
  scout_msgs
  geometry_msgs
)

# 声明catkin包
catkin_package(
  CATKIN_DEPENDS roscpp std_msgs scout_msgs geometry_msgs
)

# 包含目录
include_directories(
  ${catkin_INCLUDE_DIRS}
)

# 生成可执行文件
add_executable(show_sensor src/show_sensor.cpp)

# 依赖项
add_dependencies(show_sensor ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

# 链接库
target_link_libraries(show_sensor
  ${catkin_LIBRARIES}
)

# 安装可执行文件
install(TARGETS show_sensor
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

# 安装launch目录
install(DIRECTORY launch/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)

# 安装config目录
install(DIRECTORY config/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
)